% fname: routing_oddeven__sel_bufferlevel__topology_8x8__.m
% ./noxim -routing oddeven -sel bufferlevel -dimx 8 -dimy 8  -sim 10000 -warmup 2000 -size 8 8 -buffer 8 -hs 6 0.2 -hs 7 0.2 -hs 14 0.2 -hs 15 0.2 

function [max_pir, max_throughput, min_delay] = routing_oddeven__sel_bufferlevel__topology_8x8__(symbol)

data = [
%             pir      avg_delay     throughput      max_delay       rpackets         rflits
           0.0018          22.61      0.0148591            129            936           7489
           0.0018        21.8635      0.0154631            126            945           7546
           0.0018        24.4281      0.0151496            114            925           7393
           0.0018        21.3534      0.0155271             88            931           7453
           0.0018        23.4839      0.0147817            149            932           7450
           0.0018        23.4187      0.0158875            123            953           7626
           0.0018           22.7      0.0155594            109            950           7593
           0.0018        23.1921       0.015043            191            916           7341
           0.0018        22.2559      0.0145123            106            883           7082
           0.0018        22.2285      0.0146048            101            906           7244
           0.0018        23.3245      0.0143909            135            906           7253
           0.0018        23.6488      0.0155717            129            951           7599
           0.0018        22.1002      0.0153083            129            918           7348
           0.0018        28.3366      0.0157076            239            927           7414
           0.0018        23.1118      0.0158238            127            966           7722
           0.0018        22.2505       0.014291            126            914           7317
           0.0018        22.4526      0.0154819             99            959           7679
           0.0018        22.7154      0.0150869            108            889           7121
           0.0018        22.6577      0.0154833            134            929           7432
           0.0018         22.697      0.0151583            124            911           7276
           0.0019        23.3185      0.0169344            140           1033           8264
           0.0019        23.4132      0.0159549            139            973           7786
           0.0019        22.9654      0.0158407            134            984           7857
           0.0019        25.0188       0.015666            147            956           7645
           0.0019        20.9261      0.0148648             99            907           7254
           0.0019        20.6143      0.0155948            133            967           7735
           0.0019        24.5722      0.0161332            117            984           7873
           0.0019        24.3974      0.0166107            141           1014           8106
           0.0019        23.5686       0.015496            124            962           7686
           0.0019        24.1291      0.0159821            156           1007           8055
           0.0019        22.9762      0.0158627            109            968           7741
           0.0019        22.1712      0.0149798             95            929           7430
           0.0019        24.5106      0.0157738            185            993           7950
           0.0019        22.2844      0.0161653            171            953           7630
           0.0019        24.6653      0.0151706            182            956           7646
           0.0019        23.4399      0.0159604            153            957           7661
           0.0019        24.9961      0.0164294            176           1020           8149
           0.0019        23.4455      0.0147754            103            945           7565
           0.0019         25.232      0.0166496            180           1013           8125
           0.0019        21.8201      0.0154194            147            956           7648
            0.002        22.4253      0.0155762            111            997           7975
            0.002        24.4286      0.0173135            172           1057           8449
            0.002        24.1876      0.0163472            123           1029           8239
            0.002        23.8099      0.0174828            132           1015           8112
            0.002        25.3833      0.0172684            166           1054           8427
            0.002        23.2922      0.0167008            172           1020           8150
            0.002        26.6014      0.0163952            159           1016           8132
            0.002        26.1398      0.0167177            195           1037           8292
            0.002        25.4669      0.0177241            212           1028           8224
            0.002          23.94      0.0158652            168           1017           8123
            0.002        23.9551      0.0162698            169           1024           8200
            0.002        24.4653      0.0162848            135            993           7947
            0.002        26.6717      0.0169274            188           1051           8396
            0.002         24.166      0.0168246            103           1042           8345
            0.002        23.8848      0.0160059            126           1024           8195
            0.002        22.3001      0.0160734            122           1013           8101
            0.002        25.9159      0.0165933            245           1046           8363
            0.002        24.8925      0.0173521            182           1042           8329
            0.002        25.1004      0.0165706            196           1026           8219
            0.002        29.4457      0.0173831            320           1077           8622
           0.0021        32.2507      0.0183396            255           1101           8803
           0.0021        22.8809      0.0167917            117           1058           8463
           0.0021        26.9083      0.0173056            142           1091           8722
           0.0021        25.8357      0.0168184            144           1077           8611
           0.0021        25.0703      0.0166563            236           1067           8528
           0.0021        24.4118      0.0178402            145           1088           8706
           0.0021        25.1715      0.0167399            189           1038           8303
           0.0021        24.7844      0.0176028            114           1090           8731
           0.0021        24.9954      0.0173353            110           1091           8737
           0.0021        24.4909      0.0172637             96           1104           8839
           0.0021        25.5998          0.017            186           1087           8704
           0.0021        27.6303      0.0171667            165           1082           8652
           0.0021        24.5896      0.0175758            118           1072           8577
           0.0021        23.4791      0.0168496            147           1079           8627
           0.0021        28.3923      0.0165859            384           1063           8492
           0.0021        25.3124      0.0171465            140           1098           8779
           0.0021          26.69      0.0167857            147           1058           8460
           0.0021        28.7706      0.0171055            172           1094           8758
           0.0021        26.4119      0.0172798            135           1090           8709
           0.0021        26.2689      0.0165873            147           1045           8360
           0.0022        26.4124      0.0174921            176           1101           8816
           0.0022        26.9084      0.0178571            148           1124           9000
           0.0022        27.5058      0.0186667            228           1121           8960
           0.0022        26.7804      0.0181431            233           1125           8999
           0.0022        25.4527       0.017209            163           1100           8811
           0.0022        36.9817      0.0179824            953           1150           9207
           0.0022        27.7751      0.0184899            135           1147           9171
           0.0022         30.717      0.0182758            209           1152           9211
           0.0022        27.8612      0.0172305            154           1102           8822
           0.0022        31.9974      0.0187278            439           1160           9289
           0.0022        28.1349      0.0188665            219           1112           8905
           0.0022        25.9869      0.0172823            309           1071           8572
           0.0022        29.2394      0.0190813            234           1203           9617
           0.0022        24.0719       0.017584            103           1126           9003
           0.0022        25.3792       0.016619            138           1047           8376
           0.0022        27.9712      0.0187381            137           1179           9444
           0.0022        27.9298      0.0186331            182           1154           9242
           0.0022        25.0244      0.0185464            186           1149           9199
           0.0022        26.2625      0.0181504            225           1162           9293
           0.0022        28.9431       0.017875            141           1143           9152
           0.0023        29.3088      0.0187168            159           1198           9583
           0.0023        37.4832      0.0193413            446           1219           9748
           0.0023        30.6769       0.019873            383           1232           9857
           0.0023        29.5235      0.0186426            223           1192           9545
           0.0023        29.1034      0.0184246            237           1160           9286
           0.0023        35.1076       0.019002            233           1217           9729
           0.0023        37.0452      0.0196944            417           1240           9926
           0.0023        29.6366      0.0191371            178           1186           9492
           0.0023        25.9822      0.0192812            167           1233           9872
           0.0023        32.6153      0.0185179            426           1167           9333
           0.0023        29.9749      0.0186973            320           1197           9573
           0.0023        28.2971      0.0186653            161           1158           9258
           0.0023        27.1112      0.0183809            175           1178           9411
           0.0023        27.1541      0.0175566            138           1123           8989
           0.0023        32.0374      0.0189395            284           1175           9394
           0.0023        27.4727      0.0192123            145           1210           9683
           0.0023        27.7717      0.0181389            192           1143           9142
           0.0023        29.6085      0.0186445            236           1193           9546
           0.0023         24.292      0.0182258            107           1130           9040
           0.0023        27.1189      0.0192802            125           1194           9563
           0.0024        30.9912      0.0200746            172           1244           9957
           0.0024        29.4278      0.0204375            290           1267          10137
           0.0024        31.1836      0.0190625            377           1220           9760
           0.0024        29.8686       0.019619            195           1218           9731
           0.0024         32.336      0.0198175            407           1247           9988
           0.0024        31.1188      0.0197541            180           1204           9640
           0.0024        33.9491      0.0199629            268           1278          10221
           0.0024        32.1684      0.0196885            294           1241           9923
           0.0024        31.9509      0.0194297            454           1243           9948
           0.0024        27.6949      0.0190137            191           1216           9735
           0.0024        31.3311       0.019256            200           1214           9705
           0.0024        26.4414      0.0182637            154           1169           9351
           0.0024        30.7305      0.0202008            258           1232           9858
           0.0024        31.5287      0.0199603            296           1256          10060
           0.0024        30.3492      0.0196004            306           1194           9565
           0.0024        29.8715      0.0191855            148           1230           9823
           0.0024        30.7803      0.0199657            201           1238           9903
           0.0024        32.0818      0.0197679            241           1247           9963
           0.0024        32.1068      0.0199141            254           1274          10196
           0.0024        29.9848      0.0198353            168           1252           9997
           0.0025        29.9992      0.0204206            155           1286          10292
           0.0025        34.2593      0.0201191            294           1288          10301
           0.0025        28.7874       0.019416            247           1242           9941
           0.0025        32.2882      0.0201492            179           1249           9994
           0.0025        29.1787      0.0193164            180           1237           9890
           0.0025        32.4363      0.0199153            257           1233           9878
           0.0025        36.4444      0.0212698            266           1341          10720
           0.0025        29.3378      0.0203085            169           1258          10073
           0.0025        33.5344      0.0197539            248           1263          10114
           0.0025        32.8998      0.0210754            292           1327          10622
           0.0025        27.7433      0.0200992            158           1266          10130
           0.0025        32.4261      0.0203867            296           1305          10438
           0.0025        34.2911      0.0218065            331           1350          10816
           0.0025        31.6393      0.0201855            161           1292          10335
           0.0025        30.5267      0.0196055            165           1255          10038
           0.0025        35.5788      0.0206133            714           1320          10554
           0.0025        30.5177      0.0190039            214           1215           9730
           0.0025        38.9165      0.0211367            443           1353          10822
           0.0025        31.0889      0.0201806            288           1271          10171
           0.0025        30.8455      0.0194297            268           1243           9948
           0.0026        37.7247      0.0228033            464           1391          11128
           0.0026        34.0015      0.0215565            210           1338          10692
           0.0026        39.7784      0.0205377            408           1295          10351
           0.0026        38.0777      0.0224841            262           1416          11332
           0.0026        31.1856      0.0208027            171           1331          10651
           0.0026        35.7477      0.0209425            303           1320          10555
           0.0026        42.0443      0.0208125            617           1331          10656
           0.0026        33.3397      0.0212621            333           1319          10546
           0.0026        33.9025      0.0208281            448           1333          10664
           0.0026        34.1559       0.020869            290           1315          10518
           0.0026        32.4058      0.0206426            294           1321          10569
           0.0026        41.2491      0.0211523            688           1353          10830
           0.0026        34.3331      0.0207168            230           1324          10607
           0.0026        30.0568      0.0204226            173           1286          10293
           0.0026        30.8089      0.0202843            218           1256          10061
           0.0026        33.0765       0.020207            206           1294          10346
           0.0026        33.0244      0.0205488            257           1313          10521
           0.0026        39.1574      0.0218379            331           1398          11181
           0.0026         38.949      0.0205357            396           1294          10350
           0.0026        32.8198       0.020541            244           1315          10517
           0.0027        38.5379      0.0222695            418           1426          11402
           0.0027        30.9919       0.021248            204           1359          10879
           0.0027        43.1312      0.0217798            390           1372          10977
           0.0027        41.1893      0.0214816            680           1310          10483
           0.0027        33.8557      0.0214718            222           1331          10650
           0.0027        32.6864      0.0208145            393           1333          10657
           0.0027        45.0265      0.0224219            541           1434          11480
           0.0027        36.1812      0.0221445            282           1418          11338
           0.0027        38.8832        0.02225            364           1378          11036
           0.0027        35.4948      0.0215913            230           1358          10882
           0.0027        33.4744      0.0210833            239           1328          10626
           0.0027        50.3473      0.0228056            625           1437          11494
           0.0027        36.0654      0.0215137            297           1377          11015
           0.0027        51.1223      0.0221944            695           1398          11186
           0.0027        49.2411      0.0223294            453           1406          11254
           0.0027        39.4759       0.022082            281           1412          11306
           0.0027        41.3326      0.0215456            574           1356          10859
           0.0027        38.2447      0.0214941            286           1377          11005
           0.0027        41.3547      0.0215813            596           1359          10877
           0.0027         38.993      0.0223574            246           1430          11447
           0.0028         45.361      0.0233095            457           1471          11748
           0.0028        55.7387      0.0235302            432           1458          11671
           0.0028         41.985      0.0219414            579           1404          11234
           0.0028        41.0451      0.0232227            281           1487          11890
           0.0028        43.6004      0.0229023            461           1464          11726
           0.0028        46.1196      0.0225723            359           1446          11557
           0.0028        49.6945      0.0215215            574           1375          11019
           0.0028        38.8228      0.0216719            258           1388          11096
           0.0028        39.6605      0.0218457            327           1399          11185
           0.0028        48.8157      0.0220469            345           1411          11288
           0.0028        41.0559      0.0234805            421           1504          12022
           0.0028        59.3097      0.0235218            666           1482          11855
           0.0028        42.3508      0.0224127            471           1411          11296
           0.0028        34.8496      0.0229082            255           1463          11729
           0.0028        42.3043      0.0211855            372           1357          10847
           0.0028         49.557      0.0223242           1112           1429          11430
           0.0028        35.5692      0.0215918            237           1381          11055
           0.0028         46.926      0.0218413            665           1378          11008
           0.0028        39.4246      0.0228274            416           1439          11505
           0.0028        47.7022      0.0232381            795           1464          11712
           0.0029        46.9718      0.0232441            475           1488          11901
           0.0029        44.7541      0.0241964            372           1525          12195
           0.0029        49.8449      0.0231367            594           1483          11846
           0.0029        46.2974      0.0228867            518           1466          11718
           0.0029        58.8619       0.023543            885           1506          12054
           0.0029         47.626      0.0238359            580           1524          12204
           0.0029        44.9229      0.0228492            859           1440          11516
           0.0029         48.581      0.0231738            542           1482          11865
           0.0029        41.2226      0.0231074            367           1478          11831
           0.0029        62.9702      0.0235723           1105           1510          12069
           0.0029        44.1259      0.0230833            339           1453          11634
           0.0029        45.5148      0.0232305            873           1486          11894
           0.0029         47.072      0.0227969            668           1459          11672
           0.0029        58.0723       0.024379            491           1536          12287
           0.0029        61.0158      0.0237031            695           1517          12136
           0.0029        50.3799      0.0240992            660           1519          12146
           0.0029        60.5636      0.0236934            985           1517          12131
           0.0029        43.3878      0.0233294            336           1470          11758
           0.0029        47.5237      0.0230516            582           1453          11618
           0.0029        48.5415      0.0228027            671           1459          11675
            0.003        56.0943      0.0238496            713           1527          12211
            0.003          50.59      0.0245684            388           1573          12579
            0.003        63.2414      0.0246621           1198           1578          12627
            0.003        68.9755      0.0235996           1332           1509          12083
            0.003        73.8502      0.0246211           1104           1575          12606
            0.003        55.5098      0.0239648           1322           1534          12270
            0.003        56.7675       0.023918            526           1531          12246
            0.003        71.2906      0.0262734            673           1683          13452
            0.003         63.686      0.0244707            728           1567          12529
            0.003        52.2131      0.0244286            555           1539          12312
            0.003        67.9585      0.0240547            937           1541          12316
            0.003        50.3851      0.0243555            683           1558          12470
            0.003        51.2798       0.023998            517           1512          12095
            0.003        44.4762      0.0236647            354           1491          11927
            0.003        54.5657      0.0240437            834           1515          12118
            0.003        54.8116      0.0229102            534           1465          11730
            0.003        56.6932      0.0246706            726           1555          12434
            0.003        62.6543      0.0240195            584           1539          12298
            0.003        50.4609      0.0247419            778           1534          12272
            0.003        67.1901      0.0245195           1035           1568          12554
           0.0031        74.5248      0.0249063           1112           1595          12752
           0.0031         52.981      0.0246309            420           1576          12611
           0.0031        64.9067      0.0248145            878           1587          12705
           0.0031        49.2953      0.0253492            668           1595          12776
           0.0031        58.9193      0.0247837            728           1561          12491
           0.0031        61.9962      0.0249434            650           1596          12771
           0.0031        80.3838      0.0254687            831           1631          13040
           0.0031          64.83      0.0254492           1426           1629          13030
           0.0031        57.4465      0.0249531            504           1599          12776
           0.0031        56.9131      0.0242676            612           1554          12425
           0.0031        87.0145      0.0247754            724           1585          12685
           0.0031        49.8814         0.0245            560           1543          12348
           0.0031        79.5595      0.0249512           1359           1596          12775
           0.0031        71.4481      0.0248262            913           1589          12711
           0.0031        57.4213      0.0250119            788           1576          12606
           0.0031        73.5113      0.0255762            852           1637          13095
           0.0031        74.0679      0.0247877           1268           1560          12493
           0.0031        58.4137      0.0243789            980           1559          12482
           0.0031        101.448      0.0256602           1080           1644          13138
           0.0031        59.6366      0.0253184           1355           1621          12963
           0.0032        66.1351      0.0263075            730           1658          13259
           0.0032        66.5763      0.0247578            695           1586          12676
           0.0032         101.42      0.0263926            806           1690          13513
           0.0032        81.9729      0.0268968            683           1696          13556
           0.0032        66.6991      0.0252266            733           1615          12916
           0.0032         100.92      0.0257734           1046           1648          13196
           0.0032        66.3956      0.0260913            856           1643          13150
           0.0032        95.4539      0.0259336           1718           1659          13278
           0.0032        79.9517      0.0259464            818           1634          13077
           0.0032        99.9934      0.0259023           2389           1659          13262
           0.0032        70.6325      0.0248789           1289           1592          12738
           0.0032        80.6802      0.0253145            956           1620          12961
           0.0032        86.2815      0.0265234           1028           1698          13580
           0.0032        86.7145      0.0261719           1903           1674          13400
           0.0032        73.7731      0.0250957           1598           1604          12849
           0.0032        61.1227      0.0250645           1094           1605          12833
           0.0032         95.911      0.0263379            874           1685          13485
           0.0032        69.1591      0.0256543            731           1640          13135
           0.0032        54.6448      0.0248203            557           1588          12708
           0.0032        99.4624      0.0262012           1203           1676          13415
           0.0033        119.169      0.0268848           1253           1720          13765
           0.0033        109.825      0.0268242            917           1718          13734
           0.0033        127.114      0.0274863           1194           1759          14073
           0.0033        75.4874      0.0264563           1043           1668          13334
           0.0033        84.6685       0.026002            952           1665          13313
           0.0033        119.743      0.0270137           1249           1727          13831
           0.0033        114.458      0.0274238           1019           1756          14041
           0.0033        107.473      0.0272202           1347           1716          13719
           0.0033        75.8228      0.0260273           1121           1665          13326
           0.0033        92.4402      0.0264023           1456           1688          13518
           0.0033        113.656      0.0260547           1219           1667          13340
           0.0033         61.303      0.0257798            558           1624          12993
           0.0033        69.7826      0.0257441            521           1647          13181
           0.0033        65.6299      0.0264824           1070           1694          13559
           0.0033        73.6925      0.0264277           1331           1691          13531
           0.0033        66.8819      0.0248691            867           1592          12733
           0.0033        85.5977      0.0261348           1241           1673          13381
           0.0033        56.7202      0.0254766            549           1630          13044
           0.0033        58.5235      0.0256172            670           1639          13116
           0.0033        82.7715      0.0269531            869           1724          13800
           0.0034        130.753      0.0279453           1127           1788          14308
           0.0034        98.6248      0.0269805           1479           1727          13814
           0.0034        97.4674      0.0268223           1036           1716          13733
           0.0034        153.949       0.027168           1241           1738          13910
           0.0034        131.922      0.0280508           1328           1796          14362
           0.0034        115.095      0.0268848           1016           1720          13765
           0.0034         83.846      0.0264901            992           1669          13351
           0.0034        78.5863      0.0271309            937           1738          13891
           0.0034        83.4084      0.0269266            832           1697          13571
           0.0034        102.494      0.0274102            972           1754          14034
           0.0034        80.6699      0.0274167           1489           1727          13818
           0.0034        147.974      0.0269805           1436           1726          13814
           0.0034         91.881      0.0276171            983           1739          13919
           0.0034        103.028      0.0273281           1128           1749          13992
           0.0034        119.643      0.0281309           1069           1800          14403
           0.0034        143.985      0.0280332           1404           1795          14353
           0.0034        84.4718      0.0263125           2192           1685          13472
           0.0034        133.677      0.0268867           1538           1721          13766
           0.0034        175.434      0.0278652           1374           1784          14267
           0.0034        102.274      0.0266953           1528           1708          13668
           0.0035        109.281      0.0284623            897           1793          14345
           0.0035        115.568      0.0280586           1439           1796          14366
           0.0035        161.829      0.0278281           2351           1780          14248
           0.0035        115.207       0.027834            935           1784          14251
           0.0035        121.697      0.0294805           1427           1885          15094
           0.0035        134.998      0.0277109           1794           1773          14188
           0.0035        155.403      0.0280547           1289           1796          14364
           0.0035        131.233      0.0275742           1558           1766          14118
           0.0035         119.66      0.0280684           1466           1796          14371
           0.0035        95.7452      0.0276875            762           1770          14176
           0.0035        94.9113      0.0271035           1017           1736          13877
           0.0035        207.501      0.0291845           2272           1838          14709
           0.0035        135.222      0.0284336           1349           1818          14558
           0.0035        116.282      0.0280586           1167           1797          14366
           0.0035        117.103      0.0279167           1422           1759          14070
           0.0035        175.961      0.0282832           1566           1810          14481
           0.0035        120.961      0.0286094           1209           1832          14648
           0.0035         147.88      0.0276133           1484           1768          14138
           0.0035        98.1456      0.0273613           1226           1751          14009
           0.0035        142.932      0.0275794           1382           1738          13900
           0.0036         116.52      0.0290397            987           1830          14636
           0.0036        226.292       0.027668           1557           1771          14166
           0.0036        185.375      0.0282363           1909           1806          14457
           0.0036        211.641      0.0289258           1663           1852          14810
           0.0036        201.902      0.0290156           2288           1858          14856
           0.0036        183.449      0.0290488           1689           1861          14873
           0.0036        124.041      0.0283594           1470           1817          14520
           0.0036        143.487       0.028291           1097           1811          14485
           0.0036        225.596      0.0289802           2294           1825          14606
           0.0036        222.111      0.0288633           2421           1848          14778
           0.0036        161.355       0.027498           1081           1760          14079
           0.0036        213.987      0.0289802           3316           1826          14606
           0.0036        156.382      0.0295952           1381           1865          14916
           0.0036        183.196      0.0280762           1676           1798          14375
           0.0036        210.924      0.0285615           2723           1799          14395
           0.0036        260.639      0.0287441           2396           1840          14717
           0.0036        212.047      0.0293984           1905           1882          15052
           0.0036        126.293       0.028207           1433           1804          14442
           0.0036        258.275      0.0283164           2627           1813          14498
           0.0036        232.779      0.0283223           2211           1813          14501
];

rows = size(data, 1);
cols = size(data, 2);

data_delay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+1);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_delay = [data_delay; data(ifirst, 1:cols-5), avg ci];
end

figure(1);
hold on;
plot(data_delay(:,1), data_delay(:,2), symbol);

data_throughput = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+2);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_throughput = [data_throughput; data(ifirst, 1:cols-5), avg ci];
end

figure(2);
hold on;
plot(data_throughput(:,1), data_throughput(:,2), symbol);

data_maxdelay = [];
for i = 1:rows/20,
   ifirst = (i - 1) * 20 + 1;
   ilast  = ifirst + 20 - 1;
   tmp = data(ifirst:ilast, cols-5+3);
   avg = mean(tmp);
   [h sig ci] = ttest(tmp, 0.1);
   ci = (ci(2)-ci(1))/2;
   data_maxdelay = [data_maxdelay; data(ifirst, 1:cols-5), avg ci];
end

figure(3);
hold on;
plot(data_maxdelay(:,1), data_maxdelay(:,2), symbol);


%-------- Saturation Analysis -----------
slope=[];
for i=2:size(data_throughput,1),
    slope(i-1) = (data_throughput(i,2)-data_throughput(i-1,2))/(data_throughput(i,1)-data_throughput(i-1,1));
end

for i=2:size(slope,2),
    if slope(i) < (0.95*mean(slope(1:i)))
        max_pir = data_throughput(i, 1);
        max_throughput = data_throughput(i, 2);
        min_delay = data_delay(i, 2);
        break;
    end
end
